package com.dp.FactoryPattern;

/**
 * Created by Lzz on 3/16/2018.
 *场景： 有明确的条件选择才 创建对象。（理解2：您需要一辆汽车，可以直接从工厂里面提货，而不用去管这辆汽车是怎么做出来的）
 *
 */

public class Client {

    public static void main(String[] args){
        FactoryShopping factoryShopping = new FactoryShopping();
//        Shopping shopping = factoryShopping.getBuyActon("jeans");
//        Shopping shopping = (Shopping) factoryShopping.getBuyActonGenericity(BuyShoes.class);
        BuyTshirt shopping = factoryShopping.getBuyActonGenericity02(BuyTshirt.class);
        shopping.buy();
    }

}
